USE [RestaurantManagement]
GO

/****** Object:  Table [dbo].[RestaurantTable]    Script Date: 04/27/2013 20:59:43 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[RestaurantTable](
	[RestaurantTableID] [uniqueidentifier] NOT NULL,
	[RestaurantID] [uniqueidentifier] NULL,
	[RestaurantAreaID] [uniqueidentifier] NULL,
	[RestaurantTableCode] [varchar](20) NULL,
	[RestaurantTableName] [nvarchar](50) NULL,
	[Description] [nvarchar](255) NULL,
	[MaxPeople] [int] NULL,
	[IsOrder] [bit] NULL,
	[IsOrderOnline] [bit] NULL,
	[IsActive] [bit] NULL,
 CONSTRAINT [PK_RestaurantTable] PRIMARY KEY CLUSTERED 
(
	[RestaurantTableID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[RestaurantTable]  WITH CHECK ADD  CONSTRAINT [FK_RestaurantTable_RestaurantArea] FOREIGN KEY([RestaurantAreaID])
REFERENCES [dbo].[RestaurantArea] ([RestaurantAreaID])
GO

ALTER TABLE [dbo].[RestaurantTable] CHECK CONSTRAINT [FK_RestaurantTable_RestaurantArea]
GO

ALTER TABLE [dbo].[RestaurantTable]  WITH CHECK ADD  CONSTRAINT [FK_RestaurantTable_Restaurants] FOREIGN KEY([RestaurantID])
REFERENCES [dbo].[Restaurant] ([RestaurantID])
GO

ALTER TABLE [dbo].[RestaurantTable] CHECK CONSTRAINT [FK_RestaurantTable_Restaurants]
GO


